package com.moge.anjian.utils;


import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;
import android.provider.Settings;
import android.util.Log;
import android.view.accessibility.AccessibilityManager;

import com.moge.anjian.MogeAccessibilityManager;

public class PermissionUtil {

    public static boolean isAccessibilityServiceEnabled() {
        boolean isEnable = MogeAccessibilityManager.getService() != null;
        Log.e("dimoge", "服务启用=" + isEnable);
        return isEnable;
    }

    public static boolean isDrawOverlay(Context application){
        boolean canDrawOverlays = Settings.canDrawOverlays(application);
        Log.e("dimoge", "悬浮窗权限=" + canDrawOverlays);
        return canDrawOverlays;
    }
}
